<template>
	<view class="qilin-box">
		<nav-bar></nav-bar>
		<video-list :list="videoLists"></video-list>
		<tab-bar></tab-bar>
	</view>
</template>

<script>
	import TabBar from "../../components/tabBar.vue";
	import NavBar from "../../components/navBar.vue";
	import VideoList from "../../components/videoList.vue";
	export default {
		components:{
			TabBar,
			NavBar,
			VideoList
		},
		data() {
			return {
				videoLists:[]
			}
		},
		onLoad() {
			this.getVideos();
		},
		methods: {
			//初始化获取视频资源数据
			getVideos(){
				uni.request({
					url:"http://localhost:9999/api/videos.json",
					method:"get",
					success:(res)=>{
						this.videoLists=res.data.list;
					}
				});
			}
		}
	}
</script>

<style>
.qilin-box{
	width:100%;
	height:100%;
}
</style>
